home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / apport / package-hooks / source_apport.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  961 b   |  26 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''Apport package hook for apport itself.
  5.  
  6. This adds /var/log/apport.log and the file listing in /var/crash to the report.
  7.  
  8. (c) 2007 Canonical Ltd.
  9. Author: Martin Pitt <martin.pitt@ubuntu.com>'''
  10. APPORT_LOG = '/var/log/apport.log'
  11. import os.path as os
  12. import subprocess
  13. from glob import glob
  14. import apport.hookutils as apport
  15.  
  16. def add_info(report):
  17.     apport.hookutils.attach_file_if_exists(report, APPORT_LOG, 'ApportLog')
  18.     reports = glob('/var/crash/*')
  19.     if reports:
  20.         report['CrashReports'] = apport.hookutils.command_output([
  21.             'stat',
  22.             '-c',
  23.             '%a:%u:%g:%s:%y:%x:%n'] + reports)
  24.     
  25.  
  26.